<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FDTab test</title>
<!-- css -->
<link href="../../style/fdui.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body{font-size: 12px;background-color: #FFF;}
</style>
<!-- lib js -->
<script type="text/javascript" src="../../src/FDLib/FDLib.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDLib.ajax.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDLib.browser.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDLib.dom.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDLib.event.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDLib.string.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDLib.util.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDTag.js"></script>
<script type="text/javascript" src="../../src/FDLib/FDLib.date.js"></script>
<script type="text/javascript" src="../../src/FDLib/JString.js"></script>

<script type="text/javascript" src="../../src/FDControl/FDControl.js"></script>
<script type="text/javascript" src="../../src/FDForm/interface/FDField.js"></script>
<script type="text/javascript" src="../../src/FDForm/interface/FDItem.js"></script>
<script type="text/javascript" src="../../src/FDForm/FDComponent.js"></script>
<script type="text/javascript" src="../../src/FDForm/FDFieldComponent.js"></script>
<script type="text/javascript" src="../../src/FDForm/FDItemComponent.js"></script>

<!-- calendar -->
<script type="text/javascript" src="../../src/FDForm/FDSelectBox.js"></script>
<script type="text/javascript" src="../../src/FDCalendar/FDCalendar.js"></script>

<script type="text/javascript">
var cal;

window.onload = function() {
	cal = new FDCalendar();
	//cal.show();
	FDLib.getEl('datepick').onclick = function() {
		var e = FDLib.event.getEvent();
		cal.show(e.target,'2012-9-3',true);
	}
	
}

function show(e) {
	e = FDLib.event.formatEvent(e)
	cal.show(e.target,'2012-9-8')
}
function getValue() {
	alert(cal.getValue());
}
function setValue() {
	cal.setValue('2013-01-01');
}

</script>
</head>
<body>

<button onclick="getValue()">getValue</button>
<button onclick="setValue()">setValue('2013-01-01')</button>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="show(event)">show</button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="datepick">
</body>
</html>